From: tsteven4 Date: Sun, 3 Mar 2019 18:16:23 +0000 (-0700) Subject: clang-tidy readability-else-after-return on gui. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~8^2~32^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=557b25025fa533cb00dc1fa08c7ab9658aa6ce7e;p=gpsbabel.git clang-tidy readability-else-after-return on gui. and reformat fixes with astyle. --- diff --git a/gui/gpx.cc b/gui/gpx.cc index 5256297d3..8ac65679a 100644 --- a/gui/gpx.cc +++ b/gui/gpx.cc @@ -235,7 +235,7 @@ bool Gpx::read(const QString& fileName) tracks = gpxHandler.trkList; routes = gpxHandler.rteList; return true; - } else { - return false; } + return false; + } diff --git a/gui/mainwindow.cc b/gui/mainwindow.cc index d5e1bbbb1..ae359bd4f 100644 --- a/gui/mainwindow.cc +++ b/gui/mainwindow.cc @@ -226,9 +226,9 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) //------------------------------------------------------------------------ MainWindow::~MainWindow() { - - delete upgrade; - + + delete upgrade; + } //------------------------------------------------------------------------ // Dynamic language switching courtesy of @@ -854,8 +854,9 @@ bool MainWindow::isOkToGo() if (babelData_.outputType_ == BabelData::noType_ && !babelData_.previewGmap_) { QMessageBox::information(nullptr, QString(appName), tr("No valid output specified")); return false; - } else if (babelData_.outputType_ == BabelData::fileType_ && - babelData_.outputFileName_.length() == 0) { + } + if (babelData_.outputType_ == BabelData::fileType_ && + babelData_.outputFileName_.length() == 0) { QMessageBox::information(nullptr, QString(appName), tr("No output file specified")); return false; } diff --git a/gui/optionsdlg.cc b/gui/optionsdlg.cc index 10df747cc..fd2f590cd 100644 --- a/gui/optionsdlg.cc +++ b/gui/optionsdlg.cc @@ -55,14 +55,14 @@ QVariant getOptionValue(QList opts, int k) { if (opts[k].getValue().toString() != "") { return opts[k].getValue(); - } else { - return opts[k].getDefaultValue(); } + return opts[k].getDefaultValue(); + } //------------------------------------------------------------------------ FileDlgManager::~FileDlgManager() -= default; + = default; //------------------------------------------------------------------------ void FileDlgManager::buttonClicked() diff --git a/gui/upgrade.cc b/gui/upgrade.cc index 5dced1284..8ce6b777d 100644 --- a/gui/upgrade.cc +++ b/gui/upgrade.cc @@ -175,7 +175,8 @@ void UpgradeCheck::httpRequestFinished(QNetworkReply* reply) if (reply == nullptr) { babelData_.upgradeErrors_++; return; - } else if (reply != replyId_) { + } + if (reply != replyId_) { QMessageBox::information(nullptr, tr("HTTP"), tr("Unexpected reply.")); } else if (reply->error() != QNetworkReply::NoError) {